package com.bd.controller;

import com.bd.dao.StudentDao;
import com.bd.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private StudentDao studentDao;

    @GetMapping("/all")
    public Iterable<Student> findall(){

        return studentDao.findAll();
    }


}
